<%--
  Created by IntelliJ IDEA.
  User: 86176
  Date: 2022/4/14
  Time: 9:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>登录页面</title>
    <!--图标-->
    <link rel="stylesheet" type="text/css"
          href="${pageContext.request.contextPath}/static/login/css/font-awesome.min.css">
    <!--布局框架-->
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/login/css/util.css">
    <!--主要样式-->
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/login//css/main.css">

</head>
<body>
<%--导入js--%>
<script src="${pageContext.request.contextPath}/static/js/axios-0.18.0.js"></script>
<div class="login">
    <div class="container-login100">
        <div class="wrap-login100">
            <div class="login100-pic js-tilt" data-tilt>
                <img src="${pageContext.request.contextPath}/static/login/img/img-01.png" alt="IMG">
            </div>
            <form class="login100-form validate-form" method="post"
                  action="${pageContext.request.contextPath}/login/checkUsernameAndPasswordServlet">
				<span class="login100-form-title">
					会员登陆
				</span>

                <%-- 提示框--%>
                <div class=wrap-input100" style="color:#ff0000;display:none" id="login_msg1">账号密码错误</div>

                <div class="wrap-input100 validate-input">
                    <input class="input100" type="text" id="username" name="username" value="${cookie.username.value}"
                           placeholder="账号">
                    <span class="focus-input100"></span>
                    <span class="symbol-input100">
						<i class="fa fa-envelope" aria-hidden="true"></i>
					</span>
                </div>

                <div class="wrap-input100 validate-input">
                    <input class="input100" type="password" id="password" name="password"
                           value="${cookie.password.value}" placeholder="密码">
                    <span class="focus-input100"></span>
                    <span class="symbol-input100">
						<i class="fa fa-lock" aria-hidden="true"></i>
					</span>
                </div>

                <div>
                    记住密码：<input type="checkbox" style="text-align: left" name="status" id="status" value="1">
                </div>
                <div class="container-login100-form-btn">
                    <button class="login100-form-btn" id="tijiao">
                        登陆
                    </button>
                </div>
                <div class="text-center p-t-12">
                    <a class="txt2" href="javascript:">
                        忘记密码？
                    </a>
                </div>
                <div class="text-center p-t-136">
                    <a class="txt2" href="${pageContext.request.contextPath}/jsp/register.jsp">
                        还没有账号？立即注册
                        <i class="fa fa-long-arrow-right m-l-5" aria-hidden="true"></i>
                    </a>
                </div>
            </form>
        </div>
    </div>
</div>

<script>
    let msg1 = ${login_msg1};
    if (msg1) {
        document.getElementById("login_msg1").style.display = "";
    } else {
        document.getElementById("login_msg1").style.display = "none";
    }
</script>
<script>
    let msg2 = ${login_msg2};
    alert(msg2)
</script>
</body>
</html>
